<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Will be replace the page title -->
    <title>{% block title %}Home{% endblock %}</title>
    {% block stylesheets %}
        <!-- Bootstrap -->
        <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
    {% endblock stylesheets %}



    {% macro render_pagination(pagination, endpoint) %}

        <nav>
            <ul class="pagination">
                <li>
                    <a href="{{ url_for('blog_blueprint.home', page = pagination.prev().page) }}" aria-label="Previous">
                        <span aria-label="true">&laquo;</span>
                    </a>
                </li>
                {% for page in pagination.iter_pages() %}
                    {% if page %}
                        {% if page != pagination.page %}
                            <li><a href="{{ url_for(endpoint,page = page ) }}">{{ page }}</a></li>
                        {% else %}
                            <li><a href="">{{ page }}</a></li>
                        {% endif %}
                    {% else %}
                        <li><a>...</a></li>
                    {% endif %}
                {% endfor %}
                <li>
                    <a href="{{ url_for('blog_blueprint.home', page=pagination.next().page) }}" aria-label="Next">
                        <span aria-label="true">&raquo;</span>
                    </a>
                </li>
            </ul>
        </nav>
    {% endmacro %}
    {% block captcha %}
    {% endblock %}
</head>
<body>

<div class="container">
    <div class="jumbotron">
        <h1><a href="{{ url_for('blog_blueprint.home')}}">君霖天下</a> </h1>
        <p>Welcome to the JltxSeo's Blog!</p>
    </div>

    {% with messages = get_flashed_messages(with_categories=true) %}
      {% if messages %}
        {% for category, message in messages %}
          <div class="button" class="close" data-dismiss="alert" aria-label="Close">
            <button type="button" class="close" data-dismiss="alert" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
            {{ messages }}
          </div>
        {% endfor%}
      {% endif %}
    {% endwith %}

    {% block body %}
    {% endblock %}
</div>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<script src="{{ url_for('static', filename='js/bootstrap.min.js') }}"></script>
</body>
</html>